Optimal. Leaf size=72 \[ -\frac {2 b^2 d n^2}{x}-\frac {2 b d n \left (a+b \log \left (c x^n\right )\right )}{x}-\frac {d \left (a+b \log \left (c x^n\right )\right )^2}{x}+\frac {e \left (a+b \log \left (c x^n\right )\right )^3}{3 b n} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {2395, 2342,
2341, 2339, 30} \begin {gather*} -\frac {d \left (a+b \log \left (c x^n\right )\right )^2}{x}-\frac {2 b d n \left (a+b \log \left (c x^n\right )\right )}{x}+\frac {e \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}-\frac {2 b^2 d n^2}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 2339
Rule 2341
Rule 2342
Rule 2395
Rubi steps
\begin {align*} \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )^2}{x^2} \, dx &=\int \left (\frac {d \left (a+b \log \left (c x^n\right )\right )^2}{x^2}+\frac {e \left (a+b \log \left (c x^n\right )\right )^2}{x}\right ) \, dx\\ &=d \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x^2} \, dx+e \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx\\ &=-\frac {d \left (a+b \log \left (c x^n\right )\right )^2}{x}+\frac {e \text {Subst}\left (\int x^2 \, dx,x,a+b \log \left (c x^n\right )\right )}{b n}+(2 b d n) \int \frac {a+b \log \left (c x^n\right )}{x^2} \, dx\\ &=-\frac {2 b^2 d n^2}{x}-\frac {2 b d n \left (a+b \log \left (c x^n\right )\right )}{x}-\frac {d \left (a+b \log \left (c x^n\right )\right )^2}{x}+\frac {e \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 63, normalized size = 0.88 \begin {gather*} -\frac {d \left (a+b \log \left (c x^n\right )\right )^2}{x}+\frac {e \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}-\frac {2 b d n \left (a+b n+b \log \left (c x^n\right )\right )}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.18, size = 1544, normalized size = 21.44
method | result | size |
risch | \(\text {Expression too large to display}\) | \(1544\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 117, normalized size = 1.62 \begin {gather*} \frac {b^{2} e \log \left (c x^{n}\right )^{3}}{3 \, n} - 2 \, b^{2} d {\left (\frac {n^{2}}{x} + \frac {n \log \left (c x^{n}\right )}{x}\right )} - \frac {b^{2} d \log \left (c x^{n}\right )^{2}}{x} + \frac {a b e \log \left (c x^{n}\right )^{2}}{n} + a^{2} e \log \left (x\right ) - \frac {2 \, a b d n}{x} - \frac {2 \, a b d \log \left (c x^{n}\right )}{x} - \frac {a^{2} d}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 155 vs.
\(2 (71) = 142\).
time = 0.47, size = 155, normalized size = 2.15 \begin {gather*} \frac {b^{2} n^{2} x e \log \left (x\right )^{3} - 6 \, b^{2} d n^{2} - 3 \, b^{2} d \log \left (c\right )^{2} - 6 \, a b d n - 3 \, a^{2} d + 3 \, {\left (b^{2} n x e \log \left (c\right ) - b^{2} d n^{2} + a b n x e\right )} \log \left (x\right )^{2} - 6 \, {\left (b^{2} d n + a b d\right )} \log \left (c\right ) + 3 \, {\left (b^{2} x e \log \left (c\right )^{2} - 2 \, b^{2} d n^{2} - 2 \, a b d n + a^{2} x e - 2 \, {\left (b^{2} d n - a b x e\right )} \log \left (c\right )\right )} \log \left (x\right )}{3 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 3.22, size = 141, normalized size = 1.96 \begin {gather*} - \frac {a^{2} d}{x} + a^{2} e \log {\left (x \right )} - \frac {2 a b d n}{x} - \frac {2 a b d \log {\left (c x^{n} \right )}}{x} - 2 a b e \left (\begin {cases} - \log {\left (c \right )} \log {\left (x \right )} & \text {for}\: n = 0 \\- \frac {\log {\left (c x^{n} \right )}^{2}}{2 n} & \text {otherwise} \end {cases}\right ) - \frac {2 b^{2} d n^{2}}{x} - \frac {2 b^{2} d n \log {\left (c x^{n} \right )}}{x} - \frac {b^{2} d \log {\left (c x^{n} \right )}^{2}}{x} - b^{2} e \left (\begin {cases} - \log {\left (c \right )}^{2} \log {\left (x \right )} & \text {for}\: n = 0 \\- \frac {\log {\left (c x^{n} \right )}^{3}}{3 n} & \text {otherwise} \end {cases}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 172 vs.
\(2 (71) = 142\).
time = 2.52, size = 172, normalized size = 2.39 \begin {gather*} \frac {b^{2} n^{2} x e \log \left (x\right )^{3} + 3 \, b^{2} n x e \log \left (c\right ) \log \left (x\right )^{2} + 3 \, b^{2} x e \log \left (c\right )^{2} \log \left (x\right ) - 3 \, b^{2} d n^{2} \log \left (x\right )^{2} + 3 \, a b n x e \log \left (x\right )^{2} - 6 \, b^{2} d n^{2} \log \left (x\right ) - 6 \, b^{2} d n \log \left (c\right ) \log \left (x\right ) + 6 \, a b x e \log \left (c\right ) \log \left (x\right ) - 6 \, b^{2} d n^{2} - 6 \, b^{2} d n \log \left (c\right ) - 3 \, b^{2} d \log \left (c\right )^{2} - 6 \, a b d n \log \left (x\right ) + 3 \, a^{2} x e \log \left (x\right ) - 6 \, a b d n - 6 \, a b d \log \left (c\right ) - 3 \, a^{2} d}{3 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.73, size = 138, normalized size = 1.92 \begin {gather*} \ln \left (x\right )\,\left (e\,a^2+2\,e\,a\,b\,n+2\,e\,b^2\,n^2\right )-\frac {d\,a^2+2\,d\,a\,b\,n+2\,d\,b^2\,n^2}{x}-{\ln \left (c\,x^n\right )}^2\,\left (\frac {b^2\,d+b^2\,e\,x}{x}-\frac {b\,e\,\left (a+b\,n\right )}{n}\right )-\frac {\ln \left (c\,x^n\right )\,\left (2\,b\,d\,\left (a+b\,n\right )+2\,b\,e\,x\,\left (a+b\,n\right )\right )}{x}+\frac {b^2\,e\,{\ln \left (c\,x^n\right )}^3}{3\,n} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________